package com.wicket.okrbff.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.EvaTempFillSetService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import com.wicket.okrbff.common.ro.OkrResult;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrbff.common.util.RedisUtil;
import javax.annotation.Resource;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;
import com.wicket.okrapp.integration.FwAppEvaTempEvaSetClient;
import com.wicket.okrapp.integration.dto.AddEvaTempEvaSetComRespDto;
import com.wicket.okrapp.integration.dto.AddEvaTempEvaSetComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.FwAppIndexSystemClient;
import com.wicket.okrapp.integration.dto.RefreshTargetDataInitStatusRespDto;
import com.wicket.okrapp.integration.dto.RefreshTargetDataInitStatusReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class EvaTempFillSetServiceImpl implements EvaTempFillSetService {

  @Resource
  private RedisUtil redisUtil;
@Resource
  FwAppEvaTempEvaSetClient fwAppEvaTempEvaSetClient;
@Resource
  FwAppIndexSystemClient fwAppIndexSystemClient;
/**
   * B3-3新增评价模板填报设置(管理)[3233]
   * gen by moon at 10/2/2022, 11:28:01 PM
   */
    @Trace(operationName = "B3-3新增评价模板填报设置(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddEvaTempFillSetRespDto addEvaTempFillSet(BffAddEvaTempFillSetReqDto reqDto){
      
       
       //步骤0: D3-3新增评价模板评价设置(公共) - addEvaTempEvaSetCom
     AddEvaTempEvaSetComRespDto addEvaTempEvaSetComRespDto = null;
    AddEvaTempEvaSetComReqDto addEvaTempEvaSetComReqDto=new AddEvaTempEvaSetComReqDto();
  addEvaTempEvaSetComReqDto.setConfItemCode("TEMP_AUDIT_EVA_SET");//CUSTOM_CONVENTION//sourceId:123042_1
if(reqDto!=null){
      addEvaTempEvaSetComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:177122_1
addEvaTempEvaSetComReqDto.setTargetId(reqDto.getTargetId());//SimpleFieldAssign//sourceId:123039_1
addEvaTempEvaSetComReqDto.setBatchCode(reqDto.getBatchCode());//SimpleFieldAssign//sourceId:123041_1
    }
  
    /*D3-3新增评价模板评价设置(公共)[3225]   */
    Assert.isNull(addEvaTempEvaSetComReqDto.getConfItemCode(),"B3-3新增评价模板填报设置(管理)-D3-3新增评价模板评价设置(公共)-配置项标识不能为空",false);
Assert.isNull(addEvaTempEvaSetComReqDto.getEvaluationTemplateId(),"B3-3新增评价模板填报设置(管理)-D3-3新增评价模板评价设置(公共)-评价模板ID不能为空",false);
Assert.isNull(addEvaTempEvaSetComReqDto.getTargetId(),"B3-3新增评价模板填报设置(管理)-D3-3新增评价模板评价设置(公共)-冗余目标ID不能为空",false);
Assert.isNull(addEvaTempEvaSetComReqDto.getBatchCode(),"B3-3新增评价模板填报设置(管理)-D3-3新增评价模板评价设置(公共)-批次标识不能为空",false);
      addEvaTempEvaSetComRespDto = fwAppEvaTempEvaSetClient.addEvaTempEvaSetCom(addEvaTempEvaSetComReqDto).getData();
      
      
      
    
BffAddEvaTempFillSetRespDto retData = new BffAddEvaTempFillSetRespDto();
  
  

  
  
return retData;
  }
  //
}
